Private Sub ListBox1_Click()

    With ListBox1

        CommandButton1.Enabled = (.ListIndex <> 0)
        CommandButton2.Enabled = (.ListIndex <> .ListCount - 1)

    End With

End Sub